/**
* +----------------------------------------------------------------------
* | 友得云客  - 开启房产营销新纪元
* +----------------------------------------------------------------------
* | Copyright (c) 2019~2023 优得（西安）信息科技有限公司版权所有
* +----------------------------------------------------------------------
* | Licensed 友得云客不是自由软件 未经允许不可移除相关版权
* +----------------------------------------------------------------------
* | Author: www.youdeyunke.com
* +----------------------------------------------------------------------
*/
import request from '@/utils/request'

export function getScoreOrderList (params) {
    return request({
        url: '/admin6/score_order',
        method: 'get',
        params
    })
}

export function getScoreOrderById(id){
    return request({
        url: '/admin6/score_order/'+id,
        method: 'get'
    })
}

export function delivery(data){
    return request({
        url: '/admin6/score_order/delivery/' + data.id,
        method: 'patch',
        data: data
    })
}

export function updateDelivery(data){
    return request({
        url: '/admin6/score_order/update_delivery/' + data.id,
        method: 'patch',
        data: data
    })
}

export function addAdminRemark(data){
    return request({
        url: '/admin6/score_order/remark/' + data.id + '?admin_remark=' + data.remark,
        method: 'patch',
    })
}

export function deleteScoreOrder(id){
    return request({
        url: '/admin6/score_order/' + id,
        method: 'delete'
    })
}

export function returnOrder(data){
    return request({
        url: '/admin6/score_order/returns/' + data.id + '/' + data.operation_status,
        method: 'patch',
        data: data
    })
}

export function exportOrders (data) {
    return request({
        url: '/admin6/score_order/export',
        method: 'post',
        responseType: 'blob',
        data: data
    })
}